package com.binhthuan.catechist.client;

import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestCallback;
import com.google.gwt.http.client.Response;

/**
 * @author Giang Đinh - Request callback có kèm theo các bước tiền xử lý lỗi.
 *
 */
public abstract class ECRequestCallback implements RequestCallback {

    @Override
    public void onError(Request request, Throwable exception) {
        processError(request, exception);
    }

    @Override
    public void onResponseReceived(Request request, Response response) {
        processResponseReceived(request, response);
    }

    public abstract void processError(Request request, Throwable exception);
    
    public abstract void processResponseReceived(Request request, Response response);
}
